package com.jindu.producer.system.jpa;

import com.jindu.producer.system.model.SRolesEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

@Transactional
public interface RolesJpa extends JpaRepository<SRolesEntity,Long>,JpaSpecificationExecutor {

    SRolesEntity findById(String id);

    @Modifying
    @Query("delete from SRolesEntity where id = ?1 ")
    int deleteById(String id);
}
